Skip to content

[AgentX] Update vLLM DeepSeek-V4 B300 aggregate / 更新 vLLM DeepSeek-V4 B300 聚合配置#2233

Closed
majunze2001 wants to merge 8 commits into
SemiAnalysisAI:mainfrom
ivanium:agent/split-pr-2202-b300
Closed

[AgentX] Update vLLM DeepSeek-V4 B300 aggregate / 更新 vLLM DeepSeek-V4 B300 聚合配置#2233
majunze2001 wants to merge 8 commits into
SemiAnalysisAI:mainfrom
ivanium:agent/split-pr-2202-b300

Conversation

@majunze2001

Copy link
Copy Markdown

No description provided.

cquil11 and others added 4 commits July 15, 2026 19:19
Carry the B300-only launcher, config search space, and changelog scope from PR SemiAnalysisAI#2202.

中文:拆分 DeepSeek-V4 B300 vLLM AgentX 配方,仅保留 PR SemiAnalysisAI#2202 中的 B300 启动器、配置搜索空间和变更日志范围。
Point the split B300 changelog entry to PR SemiAnalysisAI#2225.

中文:将拆分后的 B300 变更日志条目链接到 PR SemiAnalysisAI#2225
Signed-off-by: Jeff Ma <jeffjma@umich.edu>
Signed-off-by: Jeff Ma <jeffjma@umich.edu>
Signed-off-by: Jeff Ma <jeffjma@umich.edu>
@majunze2001 majunze2001 changed the title Update dep8 args [AgentX] Update vLLM DeepSeek-V4 B300 aggregate / 更新 vLLM DeepSeek-V4 B300 聚合配置 Jul 16, 2026
@majunze2001 majunze2001 marked this pull request as ready for review July 16, 2026 08:39

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@ivanium ivanium added full-sweep-enabled NVIDIA agentx AgentX benchmarks, recipes, and infrastructure labels Jul 16, 2026
@ivanium

ivanium commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

@claude review

@Klaud-Cold

Klaud-Cold commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Claude finished @ivanium's task in 4m 25s —— View job


Code Review

  • Gather context (diff, changed files, repo guidelines)
  • Review benchmark script changes (dsv4_fp4_b300_vllm.sh)
  • Review config changes (configs/nvidia-master.yaml)
  • Review perf-changelog.yaml entry
  • Post review feedback

This PR restructures the DSV4 FP4 B300 vLLM agentic sweep: it converts DEP8 to a GPU-resident arm with its own tuning (--max-num-batched-tokens 16384, --long-prefill-token-threshold 4096, gpu-memory-utilization 0.92), adds a plain-TP4 SimpleCPU offload arm with lazy_offload, extends the TP4 GPU-resident conc ladder to 32, and drops the TP8 GPU-resident and both Mooncake arms. The script logic is sound; the main issues are documentation drift between the changelog/comments and the final config.

What I verified ✅

  • Sweep generation validates. generate_sweep_configs.py full-sweep produces exactly the four configured arms with the expected conc lists, including the DEP8 arm with router + kv-offloading: none (a combination not previously exercised).
  • DEP divisibility guard holds. All DEP8 concs [64…224] are divisible by 4, so MAX_NUM_SEQS = 2*CONC/8 is an integer (16–56); the 2*CONC % TP check at dsv4_fp4_b300_vllm.sh:31 passes for every point.
  • lazy_offload as a bare JSON boolean matches repo precedent (kimik2.5_int4_h200.sh:51 does the same), and keeping eager offload under DP-attention for cross-rank block-hash stability is consistent with the PYTHONHASHSEED=42 requirement.
  • EP handling follows the required conditional --enable-expert-parallel pattern.
  • The IS_DEP8 gating, per-arm GPU_MEM_UTIL, and MODE_ARGS branching are all clean and correct.

Issues

1. perf-changelog.yaml:4797 — description is out of sync with the final config (main finding)

The changelog line no longer matches what nvidia-master.yaml actually configures:

Changelog says YAML actually has
"GPU-resident TP4/TP8 at conc [1,2,4,6,8,12,16,20,24,28,32]" TP8 GPU-resident arm was removed; only TP4 remains
"DEP8 at conc [32,64,96,128,160,192,196,224,228]" DEP8 conc is [64, 96, 112, 128, 144, 160, 176, 192, 224]
"DEP4 at conc [8,16,24,32,40,48,56,64,72] with both SimpleCPU and Mooncake" DEP4 is SimpleCPU-only at [32, 40, 48, 56, 64, 72]; both Mooncake arms were removed

Benchmarks trigger off config-keys, so this isn't functional — but the changelog is the perf record and should describe the sweep that actually runs. It looks like the description was written for an earlier iteration and not updated by the later "add more tp configs" / "update conc list" commits. Fix this →

2. Stale comments in dsv4_fp4_b300_vllm.sh (minor)

  • Line 15: "TP4, TP8, and DEP8 … are GPU-resident" — there is no TP8 arm in the config anymore.
  • Lines 6 and 16 still describe Mooncake as part of the recipe, but both Mooncake arms were removed from the YAML. Keeping the mooncake code path for manual runs is fine, but the header should reflect the active recipe.
  • Lines 99–100: "TP4 remains GPU-resident" — this PR adds a TP4 kv-offloading: dram arm, so that's no longer accurate.

3. pr-link still points to #2225 (question, likely fine)

The edited changelog entry keeps pr-link: …/pull/2225. Since this PR targets the agent/split-pr-2202-b300 branch (which presumably lands in main via #2225), that may be intentional — just confirming it's the intended attribution rather than a leftover.

Observations (no action needed)

  • The TP4 SimpleCPU arm at conc 40 yields MAX_NUM_SEQS=80, i.e. 80 explicit FULL_DECODE_ONLY capture sizes at gpu-memory-utilization 0.96 — noticeably more graphs than the previous max (conc 16 → 32 sizes). If the top of that ladder OOMs in the sweep, capture-size count / mem-util headroom is the first knob to check.
  • DEP8 dropping from 0.96 to 0.92 mem-util alongside the 16384-token prefill budget is a sensible trade; the full sweep will confirm whether KV capacity at conc 224 still holds.

Overall: script changes look correct and well-commented; please sync the changelog description (and ideally the script header) with the final arm/conc structure before merge.

@majunze2001 majunze2001 changed the base branch from agent/split-pr-2202-b300 to main July 16, 2026 09:03
@majunze2001 majunze2001 requested a review from a team July 16, 2026 09:03

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional findings (outside current diff — PR may have been updated during review):

  • 🔴 perf-changelog.yaml:4794-4798 — This diff edits the description of the existing PR #2225 entry in perf-changelog.yaml in place instead of appending a new entry for PR #2233, which violates AGENTS.md's append-only rule and will fail CI (both process_changelog.py's deletion check and validate_perf_changelog.py's immutable-entry check, since the pr-link stays at 2225 while the description changes). The rewritten text is also inaccurate: it claims a combined 'TP4/TP8' GPU-resident arm (only TP4 exists now), the wrong DEP8 conc-list ([64,96,112,128,144,160,176,192,224], not [32,64,96,128,160,192,196,224,228]), the wrong DEP4 conc-list ([32,40,48,56,64,72], not [8,16,24,32,40,48,56,64,72]), and a stale reference to Mooncake which this PR removes for DEP4.

    Extended reasoning...

    What's wrong. The diff hunk @@ -4794,5 +4794,5 @@ in perf-changelog.yaml rewrites the description bullet of an existing entry (config-keys: dsv4-fp4-b300-vllm-agentic, pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2225) instead of appending a brand-new entry for this PR (#2233). Git history confirms this entry was created by an earlier commit and last touched to point at #2225 — it is not new content introduced by this PR, it's a historical record being overwritten.

    Why this breaks CI. AGENTS.md states perf-changelog.yaml is append-only: "new entries MUST be appended to the END, never inserted in the middle or prepended," and entries must never be deleted or modified. This is not just a style convention — it's mechanically enforced:

    • utils/process_changelog.py's get_added_lines() raises ValueError("Deletions are not allowed in perf-changelog.yaml...") on any non-whitespace deleted line. This diff deletes the old description line (- "B300: GPU-resident TP4 at conc [1,2,4,6,8,16]; ..."), which trips this check directly.
    • utils/validate_perf_changelog.py's compare_entries() allows an existing entry to change only its pr-link (a "pr-link-only correction"). Here the pr-link is left at pull/2225 while the description changes — so without_pr_link(base) != without_pr_link(head) fires the "entry N changed; existing entries are immutable except for pr-link-only corrections" error.

    Either check alone fails the changelog-processing step of the sweep pipeline (process_changelog.py runs in .github/workflows/run-sweep.yml), so this PR cannot merge as written.

    Secondary content problem. Even ignoring the append-only violation, the new description text doesn't match what configs/nvidia-master.yaml actually changed in this same PR:

    • It says "GPU-resident TP4/TP8 at conc [1,2,4,6,8,12,16,20,24,28,32]" — but this PR removes the standalone GPU-resident TP8 entry; only tp:4 carries that conc-list now. There is no TP8 GPU-resident arm to attribute it to.
    • It says "DEP8 at conc [32,64,96,128,160,192,196,224,228]" — the actual new DEP8 entry (tp:8, ep:8, dp-attn:true, kv-offloading:none) has conc-list [64,96,112,128,144,160,176,192,224]. The changelog value is essentially the old pre-PR DEP8 list [32,64,96,128,160,192,224,228] with a stray 196 spliced in — it reads as leftover/unedited text, not a description of this PR's change.
    • It says "DEP4 at conc [8,16,24,32,40,48,56,64,72]" — the actual DEP4 (SimpleCPU) list is [32,40,48,56,64,72].
    • It says "with both SimpleCPU and Mooncake" for DEP4 — but this PR deletes the DEP4 Mooncake search-space entry entirely; only SimpleCPU remains.

    Step-by-step proof of the CI failure:

    1. Base entry (before this PR) at line 4794-4798 has description ending in ...DEP8 at conc [32,64,96,128,160,192,224,228]; with both SimpleCPU and Mooncake 0.3.11.post1." and pr-link: .../pull/2225.
    2. This PR's diff changes only the description line (line 4797) — the pr-link line (4798) is untouched, still pull/2225.
    3. process_changelog.py diffs base vs head; it sees the old description line was removed (a deletion of non-whitespace content) → raises ValueError, failing the sweep's changelog-processing step.
    4. Independently, validate_perf_changelog.py compare_entries() matches base and head entries by position/config-keys, computes without_pr_link() for each, finds they differ (description changed) while pr-link is identical → raises ChangelogValidationError("entry N changed...").
    5. Either failure blocks the PR from passing CI.

    How to fix. Leave the #2225 entry byte-for-byte untouched, and append a brand-new entry at the end of the file with config-keys: dsv4-fp4-b300-vllm-agentic, pr-link pointing at #2233, and a description whose conc-lists actually match this PR's configs/nvidia-master.yaml changes: TP4 GPU-resident [1,2,4,6,8,12,16,20,24,28,32], TP4 SimpleCPU [28,32,36,40], DEP4 SimpleCPU [32,40,48,56,64,72], and DEP8 (tp:8, ep:8, dp-attn:true, kv-offloading:none) [64,96,112,128,144,160,176,192,224], with no mention of Mooncake for DEP4 since that arm is removed.

  • 🟡 configs/nvidia-master.yaml:3237-3238 — The comment '# DEP8 SimpleCPU' above the new DEP8 search-space entry is mislabeled: that entry sets kv-offloading: none with no kv-offload-backend, making it GPU-resident, not SimpleCPU-offloaded. It should read something like # DEP8 GPU-resident to match the actual config and avoid confusing future edits.

    Extended reasoning...

    In configs/nvidia-master.yaml under dsv4-fp4-b300-vllm-agentic, the new DEP8 search-space entry is:

    # DEP8 SimpleCPU
    - { tp: 8, ep: 8, dp-attn: true, kv-offloading: none, conc-list: [64, 96, 112, 128, 144, 160, 176, 192, 224], router: { name: vllm-router, version: "0.1.14" } }

    This entry sets kv-offloading: none and has no kv-offload-backend field at all. Looking at dsv4_fp4_b300_vllm.sh, the KV_OFFLOAD_BACKEND case statement treats an empty/unset backend as the require_agentic_kv_offload_none GPU-resident path — the SimpleCPUOffloadConnector branch is only reached when kv-offload-backend names vllm-simple explicitly. So this arm is GPU-resident, not "SimpleCPU"-offloaded, yet the comment directly above it says # DEP8 SimpleCPU.

    This is corroborated by three independent pieces of evidence in the same PR:

    1. The script's own updated top-of-file comment: # TP4, TP8, and DEP8 (TP8 + DP-attention) are GPU-resident (KV_OFFLOADING=none).
    2. The new IS_DEP8 branch in the script, which is explicitly the GPU-resident, high-concurrency arm (--max-num-batched-tokens 16384, --long-prefill-token-threshold 4096, --gpu-memory-utilization 0.92) — none of which pertains to SimpleCPU offload tuning.
    3. The perf-changelog.yaml entry, which groups DEP8 together with the GPU-resident TP4/TP8 arms ("GPU-resident TP4/TP8 ... and DEP8 at conc [...] (max-num-batched-tokens 16384, long-prefill-token-threshold 4096, gpu-memory-utilization 0.92)"), separately from the SimpleCPU/Mooncake DEP4 arm.

    The three sibling comments in the same search-space block (# TP4 GPU-resident, # TP4 SimpleCPU, # DEP4 SimpleCPU) are all internally consistent with their entries' kv-offloading/kv-offload-backend fields, which makes the # DEP8 SimpleCPU label stand out as the one inconsistency. It's most likely a leftover from the old DEP8 arms this PR replaced, which did use kv-offloading: dram with vllm-simple/mooncake backends (see the removed lines in the diff) — the label wasn't updated when the entry's kv-offloading value was changed to none.

    Step-by-step proof:

    1. Read the entry: kv-offloading: none, no kv-offload-backend key present.
    2. In the script, KV_OFFLOAD_BACKEND is derived from kv-offload-backend.name (absent here → empty string).
    3. The case "$KV_OFFLOAD_BACKEND" in "" branch calls require_agentic_kv_offload_none, i.e. the GPU-resident path — not the vllm-simple branch that builds the SimpleCPUOffloadConnector config.
    4. Therefore this arm never touches SimpleCPUOffloadConnector; "SimpleCPU" in the comment is factually wrong.

    Impact: Since YAML comments aren't parsed, there is no runtime effect from this PR as-is — the sweep behavior is entirely driven by the field values, which are correct and consistent with the script and changelog. The risk is purely documentation-fidelity: a future editor trusting the "SimpleCPU" label could mistakenly add a kv-offload-backend field to this entry, which would break the require_agentic_kv_offload_none assumption baked into the script's case statement for kv-offloading: none.

    Fix: Simply rename the comment to # DEP8 GPU-resident to match the actual field values and be consistent with the sibling # TP4 GPU-resident label.

Comment on lines +15 to +16
# TP4, TP8, and DEP8 (TP8 + DP-attention) are GPU-resident (KV_OFFLOADING=none).
# DEP4 uses KV_OFFLOADING=dram with KV_OFFLOAD_BACKEND=vllm-simple or mooncake.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 The header comment (lines 15-16) says TP4 is always GPU-resident (KV_OFFLOADING=none), but this same PR adds a new TP4 SimpleCPU dram-offload arm in nvidia-master.yaml plus a dedicated SIMPLE_LAZY_OFFLOAD code path for exactly that case. The comment should mention that plain TP4 can also run as a dram/SimpleCPU-offload arm; this is doc-only and has no runtime effect since the actual offload mode is driven by the per-arm kv-offloading config field, not the header prose.

Extended reasoning...

What the bug is

The updated header comment in dsv4_fp4_b300_vllm.sh (lines 15-16) reads:

# TP4, TP8, and DEP8 (TP8 + DP-attention) are GPU-resident (KV_OFFLOADING=none).
# DEP4 uses KV_OFFLOADING=dram with KV_OFFLOAD_BACKEND=vllm-simple or mooncake.

This asserts that plain TP4 (non-DP-attention) is only ever run GPU-resident. That statement is no longer accurate as of this same PR.

The contradicting code path this PR adds

This PR simultaneously adds a new # TP4 SimpleCPU search-space entry to configs/nvidia-master.yaml:

- { tp: 4, kv-offloading: dram, kv-offload-backend: { name: vllm-simple, version: "904e4ec" }, conc-list: [28, 32, 36, 40] }

That is plain TP4 (dp-attn unset/false) with kv-offloading: dram. Even more tellingly, the same PR adds a dedicated shell code path for exactly this arm:

# The plain-TP (non-DP-attention) offload ladder uses lazy offload;
# DEP keeps eager offload for cross-rank block-hash stability.
SIMPLE_LAZY_OFFLOAD=false
if [ "$DP_ATTENTION" != "true" ]; then
    SIMPLE_LAZY_OFFLOAD=true
fi

SIMPLE_LAZY_OFFLOAD is set to true precisely when DP_ATTENTION != true — i.e. for the plain-TP4-dram case introduced by the new yaml arm. The perf-changelog entry even documents it explicitly: "TP4 SimpleCPU lazy-offload at conc [28,32,36,40]".

So the script now internally contradicts itself: the header claims TP4 is GPU-resident-only, while the body implements (and the changelog documents) a plain-TP dram-offload ladder. The stale mid-file comment near the OFFLOAD_ARGS case statement ("TP4 remains GPU-resident") has the same issue.

Why existing code does not prevent this

Nothing enforces the comment against the actual config — KV_OFFLOADING/KV_OFFLOAD_BACKEND are supplied per-arm at invocation time from nvidia-master.yaml, and the header is just prose. There is no lint or test tying documentation to the search-space definitions, so the two can silently drift, which is exactly what happened here.

Step-by-step proof

  1. Sweep launcher reads configs/nvidia-master.yaml, iterates the dsv4-fp4-b300-vllm-agentic search space.
  2. It hits the new # TP4 SimpleCPU entry: tp: 4, kv-offloading: dram, kv-offload-backend: vllm-simple, no dp-attn.
  3. The launcher invokes dsv4_fp4_b300_vllm.sh with TP=4, KV_OFFLOADING=dram, KV_OFFLOAD_BACKEND=vllm-simple, DP_ATTENTION unset/false.
  4. Inside the script, DP_ATTENTION != "true", so SIMPLE_LAZY_OFFLOAD=true and the vllm-simple offload branch of the case statement runs, configuring SimpleCPUOffloadConnector with lazy_offload: true — a genuine CPU-offload run, not GPU-resident.
  5. Yet a reader relying on the header comment at lines 15-16 (or the mid-file "TP4 remains GPU-resident" note) would conclude this configuration is impossible/mislabeled, since the header states TP4 is GPU-resident only.

Suggested fix

Update the header (and the mid-file comment) to something like: "TP8 and DEP8 are GPU-resident (KV_OFFLOADING=none). TP4 and DEP4 each have both a GPU-resident and a dram/SimpleCPU-offload arm; DEP4 additionally supports mooncake." This keeps the documentation in sync with the search-space entries and the new SIMPLE_LAZY_OFFLOAD code path added by this PR.

Impact

Purely cosmetic — the comment does not drive any runtime behavior, since offload mode is controlled by the KV_OFFLOADING/KV_OFFLOAD_BACKEND env vars set per-arm by the yaml config, not by the prose. No functional bug, just a doc inaccuracy worth a follow-up fix. Marking as nit, consistent with all verifier assessments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentx AgentX benchmarks, recipes, and infrastructure full-sweep-enabled NVIDIA

Projects

Development

Successfully merging this pull request may close these issues.

4 participants